# -*- coding: utf-8 -*-
"""
Created on Tue May  3 22:11:12 2022

@author: Apple
"""

import pandas as pd       
import sys 
import os

class Logger(object):
    def __init__(self, filename="Default.log"):
        self.terminal = sys.stdout
        self.log = open(filename, "a")
 
    def write(self, message):
        self.terminal.write(message)
        self.log.write(message)
 
    def flush(self):
        pass
    
type = sys.getfilesystemencoding()
sys.stdout = Logger('scheme.txt')

file_name = r'schme.xlsx'

with open(file_name,'rb') as f:
    df = pd.read_excel(file_name)
f.close()

print("*********************方案输出************************")
for index,row in df.iterrows():
    print('编号：%d'%(index+1),'\t运输车辆:%s'%row['运输车辆'],'\t隔舱号：%s'%row['隔舱号'],'\t隔舱容量：%s'%row['隔舱容量'],'\t到站代码：%s'%row['到站代码'],'\到站名称：%s'%row['到站名称'],'\t油品名称：%s'%row['油品名称'],'\t升数 （升）：%s'%row['升数 （升）'])
    print('\n')
print("*********************方案输出完毕************************")